<template>
	<div class="home-box">
        <div class="container-box" :style="{'height': screenHeight + 'px', 'width': screenWidth + 'px'}">
            <!-- 侧边栏 -->
			<!-- <m-aside></m-aside> -->
            <div class="home-container" :style="overflowScrollingEnabled ? '-webkit-overflow-scrolling: touch;' : ''">
                    <router-view name="real"></router-view>
            </div>
            <!-- <HomeShowImg v-if="getpopupVisible"></HomeShowImg> -->
          <!-- <add-cart-for-spec></add-cart-for-spec> -->
        </div>
    </div>

</template>

<script>
import { mapGetters } from "vuex";
// import { showLoading } from "./utils/loading";
// import HomeShowImg from "./components/HomeShowImg";
import getPageName from "./utils/getPageName";
// import AddCartForSpec from './components/AddCartForSpec/index'

export default {
    name: 'hello',
    data() {
        return {};
    },
    computed: {
    	...mapGetters('xxy', [
            "getpopupVisible",
        ]),
    	...mapGetters([
            "getRouterLifeCycleOfName"
        ]),
        screenWidth() {
            return window.innerWidth;
        },
        screenHeight() {
            return window.innerHeight;
        },
        pageName() {
            return this.getRouterLifeCycleOfName;
        },
        overflowScrollingEnabled() {
            console.log("this.pageName.name", this.pageName.name !== "home")
            return this.pageName.name !== "home";
        }
    },
    methods: {
        hashChangeEvent() {
        }
    },
    components: {
        // "m-aside": () => {
        //     return new Promise(resolve => {
        //         setTimeout(() => {
        //             resolve(import("./real-containers/aside"));
        //         },500);
        //     });
        // },
        // HomeShowImg,
        // AddCartForSpec
    },
	created() {
        alert(11)
        this.hashChangeEvent();
    },
    beforeCreate() {
        // console.log("生产环境Main页面的beforeCreate方法");
    }

}
</script>

<style scoped>
    .home-box {
		height: 100%;
	}
    .container-box {
        position: absolute;
        left: 0;
        top: 0;
        /* width: 375px;
        height: 600px; */
        overflow-x: hidden;
	}
    .home-container {
		overflow-y: auto;
		overflow-x: hidden;
		width: 100%;
		height: 100%;
	}
</style>